package high.concurrent.feign;

import high.concurrent.feign.impl.OrderFeignServiceImpl;
import high.concurrent.utils.JsonData;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @FeignClient("order")要写order服务的服务名
 */
@FeignClient(name = "order", fallback = OrderFeignServiceImpl.class)
public interface OrderFeignService {

    /**
     * 查询订单状态
     * @param outTradeNo 订单号
     * @return
     */
    @GetMapping("/api/order/v1/searchOrderStatus")
    JsonData searchOrderStatus(@RequestParam(value = "outTradeNo") String outTradeNo);
}
